package com.goldcn.order.dao;

import com.goldcn.order.dto.GoodsReportDto;
import com.goldcn.order.dto.OrderCountDto;
import com.goldcn.order.model.OrderItem;
import com.goldcn.order.vo.ClassifyCountVo;
import com.goldcn.order.vo.GoodsReportAllVo;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

public interface OrderItemMapper {
    int deleteByPrimaryKey(Long itemID);

    int insert(OrderItem record);

    int insertSelective(OrderItem record);

    OrderItem selectByPrimaryKey(Long itemID);

    int updateByPrimaryKeySelective(OrderItem record);

    int updateByPrimaryKey(OrderItem record);

    List<OrderItem> selectByOrderID(Long orderID);

    int selectqtyByOrderID(Long orderID);

    BigDecimal selectSumAmountByOrderID(Long orderID);

    BigDecimal selectSumPointAmountByOrderID(Long orderID);


    BigDecimal selectSumCommissionByOrderID(Long orderID);
    BigDecimal selectSumEmpCommissionByOrderID(Long orderID);
    Map<String,Double> selectTotalCommissionByOrderID(Long orderID);

    List<Map<String, Object>> selectGoodsSalesMore(Map<String, Object> param);

    List<ClassifyCountVo> selectCountByClassify(OrderCountDto orderCountDto);

    List<OrderItem> selectByOrderPayNO(String payNO);

    int updateMD5(Map<String, Object> prams);

    //create by zll 2017/4/13
    List<GoodsReportAllVo> getGoodsReportAll(GoodsReportDto goodsReportDto);

    List<Map<String,Object>> selectCountByGoodsSkuId(GoodsReportDto goodsReportDto);
    List<OrderItem> selectOrderItemByOrderId(Long orderID);

   int  deleteByOrderID(Long orderID);

    List<Map<String,Object>> selectWithclassifyByOrderID(Long orderID);

}